package models;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.constraints.NotEmpty;

import play.db.ebean.Model;

@Entity
public class AtividadeComentario extends Model{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public long id;
	
	@ManyToOne
	public Usuario autor;

	@NotEmpty
	public String msg;
	
	@Temporal(TemporalType.DATE)
	public Date dtCadastro;
	
	@ManyToOne
	@JoinColumn(name="atividadeAluno_id")
	public AtividadeAluno atividadeAluno;
}
